package cn.edu.nsmc.modules.sys.dao;

import cn.edu.nsmc.common.utils.R;
import cn.edu.nsmc.modules.sys.entity.SysVisitorEntity;
import cn.edu.nsmc.modules.sys.entity.data.UserStatistics;
import cn.edu.nsmc.modules.sys.form.VisitorList;
import cn.edu.nsmc.modules.sys.form.req.ReqVisitorForm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @Author ZY
 * @Date 2024/2/20 19:07
 */
@Mapper
public interface SysVisitorDao extends BaseMapper<SysVisitorEntity> {
    @Update("update sys_user set username = #{username},salt  = #{salt},email  = #{email},mobile = #{mobile},status = #{status},create_user_id = #{createUserId},create_time = #{createTime},name = #{name},type = #{type},mini_use = #{miniUse},mini_attention = #{miniAttention},memo = #{memo},department_id = #{departmentId},personal_number = #{personalNumber} where user_id = #{userId}")
    int  updateVisitor(SysVisitorEntity sysVisitorEntity);

    List<ReqVisitorForm> getDepartmentList(VisitorList visitorList);
    Integer getDepartmentListNumber(VisitorList visitorList);
    ReqVisitorForm getVisitorById(Long id);

    Double getTotalNumberOfPeople();

    Double getNumberOfConcerns();

    UserStatistics getTypeNumber(UserStatistics userStatistics);
}
